gboolean frame_timestamps;
gboolean frame_finish_timestamp;
+ guint before_paint_id;
+ guint after_swap_id;
+
GDBusProxy *switcheroo_control;
GCancellable *switcheroo_cancellable;
g_clear_object (&global->app_cache);
g_clear_object (&global->app_usage);
+ g_clear_handle_id (&global->before_paint_id,
+ clutter_threads_remove_repaint_func);
+ g_clear_handle_id (&global->after_swap_id,
+ clutter_threads_remove_repaint_func);
+
the_object = NULL;
g_cancellable_cancel (global->switcheroo_cancellable);
g_signal_connect (global->stage, "notify::height",
G_CALLBACK (global_stage_notify_height), global);
- clutter_threads_add_repaint_func (CLUTTER_REPAINT_FLAGS_PRE_PAINT,
- global_stage_before_paint,
- global, NULL);
+ global->before_paint_id =
+ clutter_threads_add_repaint_func (CLUTTER_REPAINT_FLAGS_PRE_PAINT,
+ global_stage_before_paint,
+ global, NULL);
g_signal_connect (global->stage, "after-paint",
G_CALLBACK (global_stage_after_paint), global);
- clutter_threads_add_repaint_func (CLUTTER_REPAINT_FLAGS_POST_PAINT,
- global_stage_after_swap,
- global, NULL);
+ global->after_swap_id =
+ clutter_threads_add_repaint_func (CLUTTER_REPAINT_FLAGS_POST_PAINT,
+ global_stage_after_swap,
+ global, NULL);
shell_perf_log_define_event (shell_perf_log_get_default(),
"clutter.stagePaintStart",